<?php
// +----------------------------------------------------------------------
// | Yzncms [ 御宅男工作室 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2018 http://yzncms.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | fastadmin: https://www.fastadmin.net/
// +----------------------------------------------------------------------

// +----------------------------------------------------------------------
// | 邮箱验证码接口
// +----------------------------------------------------------------------
namespace app\api\controller;

use app\admin\model\UserModel;
use app\common\controller\Api;
use app\common\library\Wechat;
use think\Controller;
use think\Request;


class Login extends Api
{
    protected $noNeedLogin = ['*'];

    /*
     * 授权登录
     */
    public function wxLogin()
    {
        $data = (new \app\common\model\UserModel())->wxLogin($this->request_array);
        $data['code'] == 200 ? $this->success($data['msg'],$data['data']) : $this->error($data['msg']);
    }

    public function accLogin(){
        $data = (new \app\common\model\UserModel())->accLogin($this->request_array);
        $data['code'] == 200 ? $this->success($data['msg'],$data['data']) : $this->error($data['msg']);


    }

}
